#include <iostream>
#include "../source/public.h"

void test_request()
{
    framework::http::HttpRequest::ptr req(new framework::http::HttpRequest);
    req->setHeader("host", "www.baidu.com");
    req->setBody("hello world");
    req->dump(std::cout) << std::endl;
}

void test_response()
{
    framework::http::HttpResponse::ptr rsp(new framework::http::HttpResponse);
    rsp->setHeader("X-X", "lalala");
    rsp->setBody("hello world");
    rsp->setStatus((framework::http::HttpStatus)400);
    rsp->setClose(false);
    
    rsp->dump(std::cout) << std::endl;
}

int main(void)
{
    test_request();
    test_response();

    return 0;
}